package com.java.dynamic_proxy;

/**
 * 被代理实现类
 */
public class IdolImpl implements Idol {
    private String name;

    public IdolImpl(String name) {
        this.name = name;
    }

    @Override
    public String sing() {
        System.out.println(name + "正在唱歌");
        return "感谢大家看" + name + "唱歌";
    }

    @Override
    public String dance() {
        System.out.println(name + "正在跳舞");
        return "感谢大家看" + name + "跳舞";
    }
}
